﻿// -----------------------------------------------------------------------
// <copyright file="Customer.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Ex03.GarageLogic
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class Customer
    {
        private string m_OwnerName;
        private string m_OwnerPhoneNumber;
        private eVehicleStatus m_VehicleStatus;
        private Vehicle m_Vehicle;

        public string OwnerName
        {
            get
            {
                return m_OwnerName;
            }

            set
            {
                m_OwnerName = value;
            }
        }

        public string PhoneNumber
        {
            get
            {
                return m_OwnerPhoneNumber;
            }

            set
            {
                m_OwnerPhoneNumber = value;
            }
        }

        public eVehicleStatus VehicleStatus
        {
            get
            {
                return m_VehicleStatus;
            }

            set
            {
                m_VehicleStatus = value;
            }
        }

        public Vehicle CustomerVehicle
        {
            get
            {
                return m_Vehicle;
            }

            set
            {
                m_Vehicle = value;
            }
        }

        public StringBuilder GetCustomerDataPrint()
        {
            StringBuilder customerData = new StringBuilder();

            customerData.Append("Customer's name: " + m_OwnerName + System.Environment.NewLine);
            customerData.Append("Customer's Phone number: " + m_OwnerPhoneNumber + System.Environment.NewLine);
            customerData.Append("Vehicle Status: " + m_VehicleStatus.ToString() + System.Environment.NewLine);
            customerData.Append("Vehicle detailes: " + System.Environment.NewLine);
            customerData.Append(m_Vehicle.GetVehicleDataPrint());

            return customerData;
        }

        public enum eVehicleStatus
        {
            InRepair = 1,
            Fixed,
            Paid
        }
    }
}